﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

// MobiLib, Copyright Mirosław M. Mączka.  All Rights Reserved. This code released under the terms of the Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

namespace MobiLibrary
{
    public class CCP
    {
        //
        //==================================================================================================================================
        //
        public static string ToText(int cp)
        {
            switch (cp)
            {
                case 874: return "Thai(874)";
                case 932: return "Japanese(932)";
                case 936: return "Chinese simplified (PRC, Singapore)(936)";
                case 949: return "Korean(949)";
                case 950: return "Chinese traditional (Taiwan, Hong Kong)(950)";
                case 1200: return "Unicode UTF-16LE (1200)";
                case 1201: return "Unicode UTF-16BE (1201)";
                case 1250: return "Windows-1250 Central and Eastern European languages(1250)";
                case 1251: return "Windows-1251 Cyrillic(1251)";
                case 1252: return "Windows-1252 Western European languages(1252)";
                case 1253: return "Windows-1253 Modern Greek(1253)";
                case 1254: return "Windows-1254 Turkish(1254)";
                case 1255: return "Windows-1255 Hebrew(1255)";
                case 1256: return "Windows-1256 Arabic(1256)";
                case 1257: return "Windows-1257 Baltic languages(1257)";
                case 1258: return "Windows-1258 Vietnamese(1258)";
                case 65000: return "Unicode UTF-7 (65000)";
                case 65001: return "Unicode UTF-8 (65001)";
                    //
                case 10000: return "Macintosh Roman(10000)";
                case 10007: return "Macintosh Cyrillic(10007)";
                case 10029: return "Macintosh Central European(10029)";
                case 20127: return "US-ASCII US 7 bit character set(20127)";
                case 28591: return "ISO-8859-1(28591)";
                case 28592: return "ISO-8859-2(28592)";
                case 28593: return "ISO-8859-3(28593)";
                case 28594: return "ISO-8859-4(28594)";
                case 28595: return "ISO-8859-5(28595)";
                case 28596: return "ISO-8859-6(28596)";
                case 28597: return "ISO-8859-7(28597)";
                case 28598: return "ISO-8859-8(28598)";
                case 28599: return "ISO-8859-9(28599)";
                //case 28591: return "ISO-8859-1 (followed by ISO-8859-2 to ISO-8859-15)(28591)";
            }
            return string.Format("Unknown:{0}", cp);
        }
        //
        //==================================================================================================================================
        //
    }
}
